DOCSP-46269: atlas search & atlas vector search pages#3255
DOCSP-46269: atlas search & atlas vector search pages#3255rustagir merged 22 commits intomongodb:5.xfrom
Conversation
a22decf to
403d10a
Compare
lindseymoore
left a comment
There was a problem hiding this comment.
Good work so far! A few formatting and wording suggestions
| - ``exact``: ``bool`` (default: ``false``) | ||
| - ``filter``: ``QueryInterface`` or ``array`` (default: no filtering) | ||
| - ``numCandidates``: ``int`` or ``null`` (default: ``null``) |
There was a problem hiding this comment.
S: Same as above. I think I would create a table here with descriptions
There was a problem hiding this comment.
Wouldn't it be more readable to use a full name instead of this abbreviations I've never seen before?
atlas-search.txt
There was a problem hiding this comment.
I wanted to be comprehensive as Atlas Search and Atlas Vector Search are two separate features. But I can change the file name to atlas-search-vector-search
There was a problem hiding this comment.
Maybe create 2 pages that link each other. Indeed that's 2 distinct features.
lindseymoore
left a comment
There was a problem hiding this comment.
Thanks, LGTM w/ small suggestions!
| - ``index``: ``string`` | ||
| - ``highlight``: ``array`` | ||
| - ``concurrent``: ``bool`` | ||
| - ``count``: ``string`` | ||
| - ``searchAfter``: ``string`` | ||
| - ``searchBefore`` ``string`` | ||
| - ``scoreDetails``: ``bool`` | ||
| - ``sort``: ``array`` | ||
| - ``returnStoredSource``: ``bool`` | ||
| - ``tracking``: ``array`` |
There was a problem hiding this comment.
Hmm, perhaps listing the names of the parameters without the data type would suffice then, since the atlas documentation also includes the data type. The data type seems like unnecessary info if I don't know what the parameter is for. I'll leave up to you though!
GromNaN
left a comment
There was a problem hiding this comment.
2 remaining TODO, otherwise LGTM
| * @runInSeparateProcess | ||
| * @preserveGlobalState disabled | ||
| */ | ||
| public function autocompleteSearchTest(): void |
There was a problem hiding this comment.
This test is not executed. In PHPUnit, test must be prefixed with test: testAutocompleteSearch
| * @runInSeparateProcess | ||
| * @preserveGlobalState disabled | ||
| */ | ||
| public function vectorSearchTest(): void |
There was a problem hiding this comment.
Same issue with this test name: testVectorSearch
| do { | ||
| $ready = true; | ||
| usleep(10_000); | ||
| foreach ($collection->listSearchIndexes() as $index) { |
There was a problem hiding this comment.
I get this error:
Undefined variable $collection
The variable is named $moviesCollection.
| */ | ||
| public function vectorSearchTest(): void | ||
| { | ||
| $results = Book::vectorSearch( |
There was a problem hiding this comment.
The class is not imported, add use MongoDB\Laravel\Tests\Models\Book to the file.
| $movies = Movie::search( | ||
| sort: ['title' => 1], | ||
| operator: Search::text('title', 'dream'), | ||
| )->get(); |
There was a problem hiding this comment.
Movie::search returns an instance of Illuminate\Support\Collection. The method all() should be called to get all the results. get is to get a single item.
| public function autocompleteSearchTest(): void | ||
| { | ||
| // start-auto-query | ||
| $movies = Movie::autocomplete('title', 'jak')->get(); |
There was a problem hiding this comment.
Movie::search returns an instance of Illuminate\Support\Collection. The method all() should be called to get all the results. get is to get a single item.
documents api for atlas search & vector search
https://jira.mongodb.org/browse/DOCSP-46269
Staging -
Checklist